The Power of SOAP
Posted on December 17, 2005
The Power of SOAP Note: This is only a draftSimple Object Access Protocol, or SOAP, is an incredibly prominent buzzword lately, but does it really live up to the hype? They answer is a definitive yes. Like any tool, SOAP is not the answer to every question, but when a...
[Read More]
Hibernate Sessions In Flowscript
Posted on December 3, 2005
Hibernate Sessions In Flowscript Note: This is only a draft, including code.I ran into a problem with the solution Cocoon + Hibernate gives for closing sessions. It wasn't a fundamental problem, simply an inflexibility that needed to be addressed. The problem was that for flowscripts (CForms + Bean binding) I...
[Read More]
Cocoon Forms
Posted on November 23, 2005
Cocoon Forms Here is a small writeup on CForms usage. Again, nothing that can't be found in the documentation, just for personal reference:First create a flowscript that loads the Form resource:cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");Next create a function that creates an instance of the Form class with a form descriptor as a constructor argument.var...
[Read More]
Cocoon Authentication Framework
Posted on November 23, 2005
Cocoon Authentication Framework This may be a repeat from the documentation, but for my own reference here are the actions associated with the Cocoon Authentication Framework (CAF):auth-loginThis action attempts a login, it requires a username and optionally password to proceed; obviously it works like an action and you put the...
[Read More]
J2EE MVC Options (as of 2002)
Posted on November 9, 2005
J2EE MVC Options (as of 2002) I purchased a book, Expert One-On-One: J2EE Design and Development, that was spoken very highly of in Amazon's customer reviews. Chapter 12 explains the MVC (model-view-controller) pattern at length and outlines three open-source options for web application development using the MVC pattern.StrutsStruts seems to...
[Read More]
Popoon Hijacked!
Posted on November 7, 2005
Popoon Hijacked! Note: this article is a draft.I stole Popoon and made it run Blocks created for my system natively, and use the templates created for them natively as well.For those not familiar with Cocoon/Popoon, it is an implementation of MVC which uses pipelines to separate concerns of web applications....
[Read More]
More Zip Code Distance Calculation... Stored Procedures
Posted on October 28, 2005
More Zip Code Distance Calculation... Stored Procedures To take last night's post, Efficiently Calculating Zip Code Radius With SQL, one step farther I have created stored procedures to keep the logic entirely within the database.Procedure Definitions/* params = lat1, lon1, lat2, lon2, return = distance */CREATE OR REPLACE FUNCTION LatLonDistance(...
[Read More]
Extending Propel -- Integrating Zip Code Distance Calculation
Posted on October 28, 2005
Extending Propel -- Integrating Zip Code Distance Calculation For the past day I've been working a lot with zip code distance calculation, and now it's time to integrate my findings into my application. I've chosen to build my application around the Propel framework, so my code will be added to...
[Read More]
Efficiently Calculating Zip Code Radius With SQL
Posted on October 28, 2005
Efficiently Calculating Zip Code Radius With SQL I've been curious about how the popular website MySpace manages to pull off its "search by distance" functionality using such a huge set of data. Sofar I've thought of a few options:1) Do calculations with every query:SELECT u.username,SQRT((POW((69.1*(zd.lon-zd2.lon)*COS(zd2.lat/57.3)),2)+POW((69.1*(zd.lat-zd2.lat)),2))) AS distanceFROM zipdata zd, zipdata...
[Read More]
PHP5's __autoload() rediscovered
Posted on October 25, 2005
PHP5's __autoload() rediscovered Today I had an idea that seemed neat: a self-learning __autoload() function. The idea was that since PHP doesn't enforce the one class per file rule, or even have namespaces for hierarchical directory naming, it is fairly common to find several classes in a single file. This...
[Read More]